#include "buzzerTask.h"

#include "FreeRTOS.h"
#include "task.h"

#include "nxbot.h"

static void buzzerTask(void *pvParameters);

void executeBuzzerTask(general *pvParameter)
{
	xTaskCreate(buzzerTask,(const signed portCHAR * const) "buzzerTask",buzzerTask_stackSize,(void *)pvParameter,tskIDLE_PRIORITY+2,( xTaskHandle * ) NULL);
}


//Tarea para solo actualizar las vels en la esctructura global
static void buzzerTask(void *pvParameters)
{	
	//convertion of parameters 
	general *globals;
	globals=(general *)pvParameters;

	unsigned int freq;
	portTickType actualTick;

	
	
	actualTick = xTaskGetTickCount();
	
	for(;;)
	{		
		//aquire the frequency for the task		
		
		freq=.....;
		
		
		//time delay according to the encodersInterval value
		vTaskDelayUntil( &actualTick,(portTickType)freq);		
	}
}

